package com.qianyu.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qianyu.project.core.bean.FundEssentialinformation;
import com.qianyu.project.mapper.provider.ExpendFundPlanProvider;
import com.qianyu.project.mapper.provider.gs.TenderPurchasePlanMapperProvider;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
 * @author:xz
 * @Date: Created in 2021/2/11 15:58
 */
@Repository
public interface ExpendFundPlanMapper extends BaseMapper<FundEssentialinformation> {

    @SelectProvider(type = ExpendFundPlanProvider.class,method = "selectPageList")
    IPage<FundEssentialinformation> selectPageList(IPage page, Map<String, String> params);


    @Select("select max(plan_id) from fund_essentialinformation where year(filling_date)=year(curdate())")
    String selectMaxCode();

    @Delete("delete from fund_essentialinformation where id=#{value}")
    void del(String id);
}
